<!DOCTYPE html>
<html>
<head>
	{include file="common_header" /}
	{include file="common_top" /}
</head>
<body>

  <div class="layui-fluid">
    <div class="layui-card">
      <div class="layui-card-header">发送快递</div>
      <div class="layui-card-body" style="padding: 15px;">
        <form class="layui-form" action="" lay-filter="component-form-group">
		
			<div class="layui-form-item">
            <label class="layui-form-label">订单号</label>
            <div class="layui-input-block">{$info['o_sncode']}</div>
          </div>
		  
		  <div class="layui-form-item">
            <label class="layui-form-label">下单时间</label>
            <div class="layui-input-block">{$info['o_addtime']}</div>
          </div>
		  
		  <div class="layui-form-item">
            <label class="layui-form-label">用户</label>
            <div class="layui-input-block">{$info['u_phone']}</div>
          </div>
		  
		  <div class="layui-form-item">
            <label class="layui-form-label">快递费</label>
            <div class="layui-input-block">{$info['o_kd_money']}</div>
          </div>		  
		  
		  
		  <div class="layui-form-item">
            <label class="layui-form-label">总费用</label>
            <div class="layui-input-block">{$info['o_zmoney']}</div>
          </div>
		  

          
          <div class="layui-form-item">
            <label class="layui-form-label">礼物名称</label>
            <div class="layui-input-block">{$info['gift_title']}</div>
          </div>
		  
		  <div class="layui-form-item">
            <label class="layui-form-label">礼物价格</label>
            <div class="layui-input-block">{$info['o_gift_money']}</div>
          </div>
		  
			
		  <div class="layui-form-item">
            <label class="layui-form-label">仓库平台</label>
            <div class="layui-input-block">{$info['w_title']} {$info['pf_title']}</div>
          </div>
		  
		  
		   <div class="layui-form-item">
            <label class="layui-form-label">发货人信息</label>
            <div class="layui-input-block">
              <input type="text" name="read" id="read"   placeholder="发货人" class="layui-input" value="{$info['o_fa_name']}，{$info['o_fa_phone']}">
            </div>
          </div>
		  
		  
		  <div class="layui-form-item">
            <label class="layui-form-label">收货人信息</label>
            <div class="layui-input-block">
              <input type="text" name="read" id="read"   placeholder="收货人" class="layui-input" value="{$info['o_sho_name']},{$info['o_sho_phone']},{$info['o_sho_address']}">
            </div>
          </div>

		  
		  <div class="layui-form-item">
            <label class="layui-form-label">快递单号</label>
            <div class="layui-input-block">
              <input type="text" name="o_kddh_sncode" id="o_kddh_sncode"   placeholder="快递单号" class="layui-input" >
            </div>
          </div>
 
      
          <div class="layui-form-item layui-layout-admin">
            <div class="layui-input-block">
              <div class="layui-footer" style="left: 0;">
                <div class="layui-btn sub">立即提交</div>
                <button type="reset" class="layui-btn layui-btn-primary ">重置</button>
              </div>
            </div>
          </div>
        </form>
      </div>
    </div>
  </div>
{include file="common_footer" /} 
<script>

$(".sub").click(function(){
	//if(!$(".btn").hasClass("sub")){return false;}
	
	var o_kddh_sncode = $("#o_kddh_sncode").val();

	if(o_kddh_sncode == ""){
		show_error("快递单号不能为空！");
		return false
	}

	$.ajax({
		type:"POST",
		url:"{:url('order/edit')}",
		dataType:"json",
		data:{
			id:{$info['o_id']},
			o_kddh_sncode:o_kddh_sncode,
		},
		success:function(res){
			if(res.status == "success"){
				show_toast_callurl(res.data,"{:url('order/index')}","success");
			}else{
				show_error(res.data);
			}
		},
		error:function(jqXHR){
			console.log("Error: "+jqXHR.status);
		},
	});
	
});
</script>
</body>
</html>